fix(cache): improve NFS/lock error handling in DefaultCacheStore#6997
Open
matthdsm wants to merge 1 commit intonextflow-io:masterfrom
Open
fix(cache): improve NFS/lock error handling in DefaultCacheStore#6997matthdsm wants to merge 1 commit intonextflow-io:masterfrom
matthdsm wants to merge 1 commit intonextflow-io:masterfrom
Conversation
✅ Deploy Preview for nextflow-docs-staging canceled.
|
Three improvements to DefaultCacheStore.openDb(): 1. Log root cause: the underlying LevelDB exception is now logged at DEBUG level so it appears in .nextflow.log, aiding diagnosis. 2. Add NXF_CACHE_DIR env-var support: the new resolveCacheBaseDir() helper checks for the NXF_CACHE_DIR environment variable and uses it as the base directory for the LevelDB cache. This lets users on NFS / Lustre / GPFS clusters redirect only the cache DB to a local path (e.g. /tmp) without having to move the entire pipeline launch directory. 3. Improve error message: the previous message incorrectly advised users to use '-w' (which controls the work directory, not the cache directory). The new message accurately describes the root cause and documents both remedies: running from a local directory with -w, or setting NXF_CACHE_DIR. Fixes: DefaultCacheStore caught a generic Exception from LevelDB when the launch directory is on a filesystem without POSIX file-lock support (NFS, Lustre, GPFS, BeeGFS, …) and emitted a misleading error message. Signed-off-by: Matthias De Smet <11850640+matthdsm@users.noreply.github.com>
c630463 to
8d4a247
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Potential fix for #6996
Three improvements to DefaultCacheStore.openDb():
Log root cause: the underlying LevelDB exception is now logged at DEBUG level so it appears in .nextflow.log, aiding diagnosis.
Add NXF_CACHE_DIR env-var support: the new resolveCacheBaseDir() helper checks for the NXF_CACHE_DIR environment variable and uses it as the base directory for the LevelDB cache. This lets users on NFS / Lustre / GPFS clusters redirect only the cache DB to a local path (e.g. /tmp) without having to move the entire pipeline launch directory.
Improve error message: the previous message incorrectly advised users to use '-w' (which controls the work directory, not the cache directory). The new message accurately describes the root cause and documents both remedies: running from a local directory with -w, or setting NXF_CACHE_DIR.
Fixes: DefaultCacheStore caught a generic Exception from LevelDB when the launch directory is on a filesystem without POSIX file-lock support (NFS, Lustre, GPFS, BeeGFS, …) and emitted a misleading error message.